#!/bin/bash
set -e

if [ -z "$2" ]; then
	echo `basename $0` "<input.vcf [input2.vcf ...]>"
	exit 1
fi

#-----------------------------------------------
#-----------------------------------------------
. /mnt/ilustre/app/medical/tools/.var #---------
#-----------------------------------------------

for ini in $@; do

echo vcf to txt
nameb=`basename $ini .vcf`
namet="$namet $nameb.txt"
format_all_0508.sh $ini $nameb.txt
done


# echo format vcf 2>>$log 1>&2
# ${script_path}/format_all_0508.sh 1.high.vcf 1.high.txt 2>>$log


# echo format vcf 2>>$log 1>&2
# ${script_path}/format_all_0508.sh 1.low.vcf 1.low.txt 2>>$log


# echo format vcf 2>>$log 1>&2
# ${script_path}/format_all_0508.sh 1.fp.vcf 1.fp.txt 2>>$log


echo; echo txt2xls
echo $namet
perl ${script_path}/txt2xls_0427.pl 1.summary.txt $namet 1.xls 2>>$log
# perl ${script_path}/txt2xls_0413.pl 1.summary.txt 1.high.txt 1.low.txt 1.xls 2>>$log
